package com.magicborrow.activity;

import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.TextView;

import com.magicborrow.R;

/**
 * Created by River on 7/4/16.
 */
public class ThirdProtolActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.text_webview_activity);
        String  content = "<p class=\"p1\">\n" +
                "    <span class=\"s1\">北京潘斯科技有限公司拥有</span><span class=\"s2\">”</span><span class=\"s1\">魔借</span><span class=\"s2\">”</span><span class=\"s1\">内所有资料的版权。</span>\n" +
                "</p>\n" +
                "<p class=\"p2\">\n" +
                "    <span class=\"s1\"></span><br/>\n" +
                "</p>\n" +
                "<p class=\"p1\">\n" +
                "    <span class=\"s2\">“</span><span class=\"s1\">魔借</span><span class=\"s2\">”</span><span class=\"s1\">所有的产品、技术与所有程序均属于北京潘斯科技知识产权，在此并未授权。</span><span class=\"s2\">“</span><span class=\"s1\">魔借</span><span class=\"s2\">”</span><span class=\"s1\">及相关图形等为北京潘斯科技公司的注册商标。</span>\n" +
                "</p>\n" +
                "<p class=\"p2\">\n" +
                "    <span class=\"s1\"></span><br/>\n" +
                "</p>\n" +
                "<p class=\"p1\">\n" +
                "    <span class=\"s2\">“</span><span class=\"s1\">魔借</span><span class=\"s2\">”</span><span class=\"s1\">所刊登的所有内容，包括但不限于图片、文字及多媒体形式的信息等，未经著作权人合法授权，禁止一切形式的下载、转载使用或者建立镜像。获得合法授权的，应在授权范围内使用，必须为作者署名并注明</span><span class=\"s2\">“</span><span class=\"s1\">来源：魔借</span><span class=\"s2\">”</span><span class=\"s1\">字样，且均以获得信息为目的，不得用于商业目的。违反上述声明者，本网站将依法追究其相关法律责任。</span>\n" +
                "</p>\n" +
                "<p class=\"p2\">\n" +
                "    <span class=\"s1\"></span><br/>\n" +
                "</p>\n" +
                "<p class=\"p1\">\n" +
                "    <span class=\"s2\">1</span><span class=\"s1\">、</span><span class=\"s2\">“</span><span class=\"s1\">魔借</span><span class=\"s2\">”</span><span class=\"s1\">独立拥有北京潘斯科技有限公司对其发布的或与合作公司共同发布的包括但不限于产品或服务的全部内容及</span><span class=\"s2\">“</span><span class=\"s1\">魔借</span><span class=\"s2\">”</span><span class=\"s1\">上的材料拥有版权等知识产权，受法律保护。</span>\n" +
                "</p>\n" +
                "<p class=\"p2\">\n" +
                "    <span class=\"s1\"></span><br/>\n" +
                "</p>\n" +
                "<p class=\"p1\">\n" +
                "    <span class=\"s2\">2</span><span class=\"s1\">、凡带有</span><span class=\"s2\">“</span><span class=\"s1\">魔借</span><span class=\"s2\">”</span><span class=\"s1\">水印</span><span class=\"s2\">LOGO</span><span class=\"s1\">的所有文字、图片、音频、视频及页面设计、编排、软件、及</span><span class=\"s2\">“</span><span class=\"s1\">魔借</span><span class=\"s2\">”</span><span class=\"s1\">网站上的材料，其版权均属于</span><span class=\"s2\">“</span><span class=\"s1\">魔借</span><span class=\"s2\">”</span><span class=\"s1\">，任何媒体、单位或个人未经本网书面授权不得以任何形式转载、摘编、改编或以其他方式复制发表。经本网授权的媒体、单位或个人，应在授权范围内使用，并注明来源</span><span class=\"s2\">“</span><span class=\"s1\">魔借</span><span class=\"s2\">”</span><span class=\"s1\">。</span>\n" +
                "</p>\n" +
                "<p class=\"p2\">\n" +
                "    <span class=\"s1\"></span><br/>\n" +
                "</p>\n" +
                "<p class=\"p1\">\n" +
                "    <span class=\"s2\">3</span><span class=\"s1\">、除非法律另有规定，未经</span><span class=\"s2\">“</span><span class=\"s1\">魔借</span><span class=\"s2\">”</span><span class=\"s1\">书面许可，任何人不得对本网拥有版权和</span><span class=\"s2\">/</span><span class=\"s1\">或其他知识产权的任何内容使用、复制、修改、抄录、传播或与其它产品捆绑使用、销售，或在非</span><span class=\"s2\">“</span><span class=\"s1\">魔借</span><span class=\"s2\">”</span><span class=\"s1\">所属的服务器上做镜像或以其他任何方式进行使用。</span>\n" +
                "</p>\n" +
                "<p class=\"p2\">\n" +
                "    <span class=\"s1\"></span><br/>\n" +
                "</p>\n" +
                "<p class=\"p1\">\n" +
                "    <span class=\"s2\">4</span><span class=\"s1\">、对于不当转载或引用本网内容而引起的民事纷争、行政处理或其他损失，本网不承担责任。</span>\n" +
                "</p>\n" +
                "<p class=\"p2\">\n" +
                "    <span class=\"s1\"></span><br/>\n" +
                "</p>\n" +
                "<p class=\"p1\">\n" +
                "    <span class=\"s2\">5</span><span class=\"s1\">、对不遵守本声明的用户或其他违法、恶意使用本网内容者，本网保留追究其法律责任的权利。</span>\n" +
                "</p>\n" +
                "<p class=\"p2\">\n" +
                "    <span class=\"s1\"></span><br/>\n" +
                "</p>\n" +
                "<p class=\"p1\">\n" +
                "    <span class=\"s2\">6</span><span class=\"s1\">、本声明未涉及的问题请参见国家有关法律法规，当本声明与国家有关法律法规冲突时，以国家法律法规为准。</span>\n" +
                "</p>\n" +
                "<p class=\"p2\">\n" +
                "    <span class=\"s1\"></span><br/>\n" +
                "</p>\n" +
                "<p class=\"p1\">\n" +
                "    <span class=\"s2\">7</span><span class=\"s1\">、本网站相关声明版权及其修改权、更新权和最终解释权均属</span><span class=\"s2\">“</span><span class=\"s1\">魔借</span><span class=\"s2\">”</span><span class=\"s1\">所有。</span>\n" +
                "</p>\n" +
                "<p>\n" +
                "    <br/>\n" +
                "</p>";
        ((TextView)findViewById(R.id.title)).setText("版权");
        WebView webView = (WebView)findViewById(R.id.webView);
        webView.getSettings().setDefaultTextEncodingName("UTF -8");//设置默认为utf-8
        webView.loadData(content, "text/html; charset=UTF-8", null);//这种写法可以正确解码
        ((ImageView)findViewById(R.id.iv_back)).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }
}
